<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="shop.css">
    <script src="book.js"></script>
    <script src="bookPress.js"></script>
    <script src="shop.js"></script>

</head>
<body>
  <div id="mainDiv">
      <div class="bookDiv" style="display: flex">
        <div style="width: 250px;">
          <span id="idSpan" style="display:none;"></span>
          <p>图书名：<span id="bookNameSpan"></span></p>
          <p>作者：<span id="authSpan"></span></p>
          <p>售价：<span id="priceSpan"></span></p>
          <input type="button" value="放入购物车" onclick="buy($('idSpan').innerHTML)">
        </div>
        <img src="" width="150" height="200" id="bookImg">
      </div>

      <div class="bookDiv">
        <table width="100%" cellspacing="0" border="1">
            <thead>
              <tr><th>书名</th><th>作者</th><th>售价</th></tr>
            </thead>

            <tbody id="bookData"></tbody>
        </table>
        图书名：<input type="text" id="searchName">
        <input type="button" value="搜索" onclick="searchBook()">
      </div>
  </div>

  <div id="shopDiv">
     <div id="shopContentDiv">
       <table border="1" cellspacing="0" width="100%">
         <thead>
            <tr><th>商品名</th><th>单价</th><th>数量</th><th>单项总价</th><th>移除商品</th></tr>
         </thead>
         <tbody id="shopData"></tbody>
       </table>
       总价：￥<span id="totalSpan"></span><br>
       <input type="button" value="继续购物" onclick="$('shopDiv').style.visibility='hidden'">
     </div>
  </div>
</body>
</html>
